from collections import defaultdict

n, m = map(int, input().split())  # 店, 花
MODE = int(1e9+7)
dp = [[defaultdict(int) for _ in range(n+1)] for _ in range(m+1)]
dp[0][0][2] = 1

for i in range(m+1):
    for j in range(n+1):
        if i:
            for key, val in dp[i-1][j].items():
                if key == 0:
                    continue
                dp[i][j][key-1] = (dp[i][j][key-1] + val) % MODE
        if j:
            for key, val in dp[i][j-1].items():
                if key > m - i: continue
                dp[i][j][2*key] = (dp[i][j][2*key] + val) % MODE

print(dp[m-1][n][1] % MODE)
